package com.zy.cat.entity.dev;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Index;
import javax.persistence.Table;

import com.zy.cat.entity.primary.CatDevZJInviteIncomeHistoryPrimary;
import com.zy.cat.entity.primary.CatDevRegisterIncomeHistoryPrimary;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @info 用户注册奖励
 * @author Link
 * @date 2019-11-26 14:44
 */
@Entity
@Table(name = "zy_cat_user_register_income_data", indexes = { 
		@Index(name = "pid", columnList = "pid"),
		@Index(name = "rtype", columnList = "rtype"), 
		@Index(name = "lstatus", columnList = "lstatus"), 
		@Index(name = "ltime", columnList = "ltime"),
		@Index(name = "ctime", columnList = "ctime") })
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("用户注册奖励")
@IdClass(CatDevRegisterIncomeHistoryPrimary.class)
public class CatDevRegisterIncomeHistory {

	@Id
	@Column(columnDefinition = "CHAR(32) NOT NULL COMMENT '账号ID【用户注册奖励】'")
	@ApiModelProperty(value = "账号ID", example = "3d6a4fa29641")
	private String pid;
	
	@Id
	@Column(columnDefinition = "BIGINT(20) DEFAULT '0' COMMENT '奖励类型（0.现金豆、1.现金 、2.肥料）'")
	@ApiModelProperty(value = "奖励类型（0.现金豆、1.现金 、2.肥料）", example = "0")
	private int rtype;
 
	@Column(columnDefinition = "BIGINT(20) DEFAULT '0' COMMENT '注册现金奖励（现金豆/人民[分]）'")
	@ApiModelProperty(value = "注册奖励（现金豆/人民[分]）", example = "300")
	private long dcount;

	@Column(columnDefinition = "INT(10) DEFAULT '1' COMMENT '领取状态（-1.违规无法领取、0.领取中、1.已领取）'")
	@ApiModelProperty(value = "领取状态（-1.违规无法领取、0.领取中、1.已领取）", example = "1")
	private int lstatus;

	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '创建时间'")
	@ApiModelProperty(value = "创建时间", example = "2019-02-22 12:56:56")
	private String ctime;

	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '最后更新时间'")
	@ApiModelProperty(value = "最后更新时间", example = "2019-02-22 12:56:56")
	private String ltime;

	@Column(columnDefinition = "VARCHAR(200) DEFAULT '-' COMMENT '备注'")
	@ApiModelProperty(value = "备注", example = "备注")
	private String info = "-";
}
